﻿using System;
using System.Text;

class Utf8String
{
    public static void PrintStringAsBytesInUtf8(string str)
    {
        Console.WriteLine(str);
        byte[] bytes = Encoding.UTF8.GetBytes(str);
        foreach (byte b in bytes)
        {
            Console.Write("\\x{0:x2}", b);
        }
        Console.WriteLine();
    }

    public static void Main()
    {
        PrintStringAsBytesInUtf8("Hi!");
    }
}
